<%-- 
    Document   : comm
    Created on : 2014/2/24, 上午 11:52:20
    Author     : Gjun
--%>

<%@page import="java.util.HashMap"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    String id=request.getParameter("id");    
    String pag=request.getParameter("pag");
    //String sql="select id,產品名稱,庫存量,產品介紹 from 產品維護 where id="+id;
    comm.comm com=new db.DAO().getcomm(id);
    session.setAttribute("buy",com);
%>  
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
         <%out.print("<td><img src=\"productPic\\"+id+".png\" width=\"200\" height=\"200\"><br>");%>
            產品名稱:&nbsp;&nbsp;&nbsp;<%=com.getName()%><br>
            產品價格:&nbsp;&nbsp;&nbsp;<%=com.getPrice()%><br>
            <form action="add.jsp" method="post">
            <select id="num"  name="addnum" >
                <%
                for(int i=1;i<=10;i++)              
                    out.print("<option value="+i+">"+i+"</option>"); 
                 %>   
            </select>         
            <input type="submit" value="加入購物車">                        
            <input type="hidden" value="<%=id%>" name="id">             
            <input type="hidden" value="<%=pag%>" name="pag">
            
        </form>
        <form action="daocy.jsp">
            <input type="submit" value="回目錄">
            <input type="hidden" value="${param.pag}" name="pag">
        </form>
        產品介紹:<%=com.getSay()%>        
    </body>
</html>
